package cn.edu.javaweb.service;

import cn.edu.javaweb.utils.DBUtil;

public class AdminPassService {
	DBUtil db;
	
	public int getPass(String id){
		DBUtil db;
		
		db=new DBUtil(); //建创对象 搭桥配置初始化
		String sql="update examine set state=0 where id='"+id+"'";
		System.out.println(sql);
		int result=db.update(sql);
		
		return result;
	}
	
	public int getAdd(String name,String password,String uclass,String sex,String tel){
		
		db=new DBUtil(); //建创对象 搭桥配置初始化
		String add="insert into user(username,password,uclass,sex,tel,ident) values('"+name+"','"+password+"','"+uclass+"','"+sex+"','"+tel+"',0)";   //写入sql语句
//			System.out.println(sql);
		int result=db.update(add);
		
		return result;
	}
}
